<?php

include_once(AppRoot . AppController . "cXMLController.php");
include_once(AppRoot . AppController . "cFormController.php");

$cformCreate = new cFormController();
$xmlObj = new cXMLController();


if ($post['tablenames']) {
    $xmlObj->file = AppRoot . IncDir . 'admin/formdesigns/' . $_POST['tablenames'] . '.xml';
}


$data = $cformCreate->getSelectData('information_schema.tables', 'table_name', array("TABLE_SCHEMA='" . DataBaseName . "'"), '1');
$content_details_array["formelements"]["tablenames"] = array("displayName" => "Tables/Views", "name" => "tablenames", "id" => "tablenames", "class", "style", "error", "mandatory" => true, 'data' => $data, 'event' => 'onChange="this.form.submit()"', 'value' => $_POST['tablenames']);

if ($post['tablenames']) {
    $saveddata = $xmlObj->readXmlFile();
}


?>
